home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / source / thesource6.dms / thesource6.adf / Source / Compression / hcompress.lha / hcompress / unix / makefile < prev   
Encoding:
Makefile  |  1992-04-24  |  2.0 KB  |  83 lines

  1. # makefile for hcompress programs
  2. # R. White, 20 April 1992
  3. #
  4. # Change INSTALLDIR to point to the directory where you want the programs
  5. # installed.  (The default is your own bin directory.)  Then do "make install"
  6. # to install the programs.  A simple "make" will compile and link the programs
  7. # in this directory, but will not install them.
  8. #
  9. INSTALLDIR = ${HOME}/bin
  10. #
  11. CFLAGS = -O
  12. LIBABBR = hcomp
  13. LIB = lib${LIBABBR}.a
  14. LDFLAGS = -L. -l${LIBABBR} -lm
  15.  
  16. all: hcomp hdecomp
  17.     @echo "All programs compiled and linked."
  18.  
  19. clean :
  20.     -/bin/rm *.o hcomp hdecomp ${LIB}
  21.  
  22. #
  23. # Install the programs:
  24. # (1) Move the executables to INSTALLDIR
  25. # (2) Copy the shell scripts to INSTALLDIR, removing the ".csh" extension
  26. # (3) Create a link from fdecompress to hdecompress in INSTALLDIR
  27. #
  28. install : hcomp hdecomp
  29.     @/bin/mv hcomp       ${INSTALLDIR}/hcomp
  30.     @/bin/mv hdecomp     ${INSTALLDIR}/hdecomp
  31.     @/bin/cp hcompress.csh     ${INSTALLDIR}/hcompress
  32.     @/bin/cp fcompress.csh     ${INSTALLDIR}/fcompress
  33.     @/bin/cp hdecompress.csh   ${INSTALLDIR}/hdecompress
  34.     @/bin/ln -s ${INSTALLDIR}/hdecompress ${INSTALLDIR}/fdecompress
  35.     @echo
  36.     @echo "All files installed in ${INSTALLDIR}"
  37.     @echo "Type 'rehash' to update path tables"
  38.  
  39. # library
  40.  
  41. ${LIB}: \
  42.         ${LIB}(bit_input.o)            \
  43.         ${LIB}(bit_output.o)        \
  44.         ${LIB}(decode.o)            \
  45.         ${LIB}(digitize.o)            \
  46.         ${LIB}(dodecode.o)            \
  47.         ${LIB}(doencode.o)            \
  48.         ${LIB}(encode.o)            \
  49.         ${LIB}(fitspass.o)            \
  50.         ${LIB}(fitsread.o)            \
  51.         ${LIB}(get_data.o)            \
  52.         ${LIB}(getopt.o)            \
  53.         ${LIB}(hinv.o)                \
  54.         ${LIB}(hsmooth.o)            \
  55.         ${LIB}(htrans.o)            \
  56.         ${LIB}(makefits.o)            \
  57.         ${LIB}(put_data.o)            \
  58.         ${LIB}(qread.o)                \
  59.         ${LIB}(qtree_decode.o)        \
  60.         ${LIB}(qtree_encode.o)        \
  61.         ${LIB}(qwrite.o)            \
  62.         ${LIB}(swap_bytes.o)        \
  63.         ${LIB}(undigitize.o)
  64.     ranlib ${LIB}
  65.     @echo Library is up to date
  66.  
  67. .PRECIOUS: ${LIB}
  68.  
  69. # New rules for library entries
  70.  
  71. .c.a:
  72.     ${CC} -c ${CFLAGS} $<
  73.     @ar rv ${LIB} $*.o
  74.     @rm -f $*.o
  75.  
  76. #
  77. # executables
  78. #
  79. hcomp : hcomp.o ${LIB}
  80.     ${CC} ${CFLAGS} hcomp.o -o hcomp ${LDFLAGS}
  81. hdecomp : hdecomp.o ${LIB}
  82.     ${CC} ${CFLAGS} hdecomp.o -o hdecomp ${LDFLAGS}
  83.